#include <stdio.h>

int main()
{
    int m;
    scanf("%d", &m);
    int i = 0;
    while (m != 1)
    {
        if (m % 2 == 0) // even number
        {
            m /= 2;
            i++;
        }
        else
        {
            m = 3 * m + 1;
            i++;
        }
    }
    printf("%d\n", i);
    return 0;
}